1. Field of the invention
The present invention relates to a trigonometric function preprocessing system.
2. Description of related art
Heretofore, in order to obtain the value of trigonometric functions such as sin X and cos Y, there have been known a variety of algorithms such as series expansions, for example Taylor expansion or Chebyshev expansion, or so-called CORDIC. However, since it is not useful to use these algorithms in a broadly defined area in view of precision and time of operation, it is an ordinary practice to first execute a residue arithmetic operation so that the remainder of X comes under an extent of 0 to .pi./4 and then to apply the algorithms to only a narrow extent of 0&lt;.times.&lt;.pi./4.
In brief, a conventional trigonometric function processing system has executed the following steps by means of microprograms. Specifically, in the case of obtaining trigonometric functions such as Y=sin X and Y=cos X, the residue arithmetic operation is carried out by putting X as a dividend and .pi./4 as a divisor so that the remainder R fulfils a condition of 0&lt;R&lt;.pi./4. Then, three least significant bits of a quotient of the residue arithmetic operation are examined bit by bit so as to sequentially set corresponding three flags. Two values are selected from the three flags thus set and another flag indicative of a sign of a given input X and a sign of the solution Y is determined on the basis of the selected two values. Further, another pair of values are selected from the three flags thus set, and the type of a trigonometric function operation to be executed is selected on the selected pair of values. Thereafter, the selected trigonometric function operation is executed so as to obtain an absolute value of the solution Y, and then, the absolute value thus obtained and the sign of the solution already obtained are combined to give a value of the solution Y.
As seen from the above, since the conventional system processes the above mentioned various steps by means of microprograms, it has required a large number of program steps, particularly for the sequential process for setting the three flags, the sequential process for determining the sign of the solution and the sequential process for selecting the type of trigonometric function operation to be executed. Therefore, the conventional system has needed a long execution time.